using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;

namespace GraphFS
{
	enum FSNodeRole
	{
		Any,
		Start,
		End

	}
	public class FSNode
	{

		private Int64 nodeId;
		public Int64 NodeId
		{
			get { return nodeId; }
		}

		

		private bool mark;
		public bool Mark
		{
			get { return mark; }
			set { mark = value; }
		}


		

		private GeoPoint location;
		public GeoPoint Location
		{
			get { return location; }
		}




		public FSNode(Int64 nodeId, double lat, double lon)
		{
			this.nodeId = nodeId;
			
			this.location.Lat = lat;
			this.location.Lon = lon;
		}

		public FSNode(Int64 nodeId, GeoPoint location)
		{
			this.nodeId = nodeId;
			this.location= location;
			
			
		}



		public override string ToString()
		{
			return String.Format("FSNODE ({0},{1})", nodeId, location);
		}



		public static double operator ^(FSNode a, FSNode b) //squared distance
		{
			GeoSize dif = (a.Location - b.Location);
			return Math.Pow(dif.Width, 2) + Math.Pow(dif.Height, 2);
		}

		public static double operator %(FSNode a, FSNode b) //distance
		{
			return Math.Sqrt(a ^ b);

		}
	




	}
}
